<!doctype html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%
    String path = request.getContextPath();
%>
<html>
<head>
    <%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
    <script type="text/javascript" src="${path}/html/js/jquery.form.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/common/select-plugin.js?v=1"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/us/office/officeOption.js?v=<%out.print(Math.random());%>"></script>
</head>
<body>
<div class="place">
    <span>当前位置：</span>
    <ul class="placeul">
        <li><a href="${path}/office/index.do">项目部列表</a></li>
        <c:if test="${office.officeId == null}">
            <li><a >添加项目部</a></li>
        </c:if>
        <c:if test="${office.officeId != null}">
            <li><a >修改项目部</a></li>
        </c:if>
    </ul>
</div>

<form id="office_form" class="form" method="post" action="#">
    <div class="formbody">
        <div style="margin-top: 40px;"><span></span></div>
        <ul class="forminfo">
            <li>
                <label style="text-align:right;">所属公司：</label>
                <input class="easyui-combotree" id="companyTree" style="width:255px; height: 30px" data-options="required:true, prompt:'--请选择--'" missingMessage="所属公司不能空" />
                <input type="hidden" name="officeId"  id="officeId" value="${office.officeId}"/>
                <input type="hidden" name="officeCode" value="${office.officeCode}"/>
                <input type="hidden" id="companyId" name="companyId" value="${office == null ? DefaultCompany : office.companyId }"/>
            </li>
            <li>
                <label style="text-align:right;">所属项目部：</label>
                <input type="hidden" id="parentId" name="parentId" value="${office.parentId}"/>
                <input class="easyui-combotree" id="officeTree" style="width:255px; height: 30px"  data-options="prompt:'--请选择--'" editable="false"  />
            </li>
            <li>
                <label style="text-align:right;">项目部名称：</label>
                <input class="easyui-textbox" name="name" id="name" type="text" required="true" data-options="validType:'length[1,15]', prompt:'请输入项目部名称'" missingMessage="项目部名称不能为空" style="width:255px; height: 30px" value="${office.name}"/>
            </li>
            <li>
                <label style="text-align:right;">项目部负责人：</label>
                <input class="easyui-textbox" name="principal" id="principal" data-options="prompt:'请输入项目部负责人'" value="${office.principal}" style="width:255px; height: 30px">
            </li>
            <li>
                <label style="text-align:right;">联系人电话：</label>
                <input class="easyui-textbox" type="text" name="principalTel" id="principalTel" data-options="validType:['mobile'], prompt:'请输入联系人电话'" value="${office.principalTel}"  style="width:255px; height: 30px">
            </li>
            <li>
                <label style="text-align:right;">固定电话：</label>
                <input class="easyui-textbox" name="landlinePhone" id="landlinePhone" type="text" data-options="validType:['phone'], prompt:'请输入固定电话'" value="${office.landlinePhone}" style="width:255px; height: 30px">
            </li>
            <li>
                <label style="text-align:right;">传真号码：</label>
                <input class="easyui-textbox" name="fax" id="fax" data-options="validType:['fax'], prompt:'请输入传真号码'" value="${office.fax}"  style="width:255px; height: 30px">
            </li>
            <li>
                <label style="text-align:right;">项目部邮箱：</label>
                <input class="easyui-textbox" name="email" id="email" data-options="validType:['email'], prompt:'请输入项目部邮箱'" value="${office.email}"  style="width:255px; height: 30px">
            </li>
            <c:if test="${null == office.sort}" >
            <li>
                <label style="text-align:right;">项目部排序：</label>
                <input class="easyui-numberspinner" name="sort"  value="1" data-options="min:1, max:999999999" style="width:255px; height: 32px">
            </li>
            </c:if>
            <c:if test="${null != office.sort}" >
                <li>
                    <label style="text-align:right;">项目部排序：</label>
                    <input class="easyui-numberspinner" name="sort" value="${office.sort}" data-options="min:1, max:999999999" style="width:255px; height: 32px">
                </li>
            </c:if>
            <li>
                <label style="vertical-align: top;">项目部备注：</label>
                <input class="easyui-textbox" data-options="multiline:true, validType:'length[1,200]',prompt:'请输入项目部备注'"  name="remark" id="remark" value="${office.remark}" style="width:255px;height:100px" />
            </li>
        </ul>
    </div>
</form>
<div class="formbody" style="margin-left: 120px">
    <a id="optionOffice" class="easyui-linkbutton c1" style="width:100px; height: 35px">保存</a>
    &nbsp;&nbsp;&nbsp;
    <a href="${path}/office/index.do" class="easyui-linkbutton c1" style="width:100px; height: 35px">取消</a>
</div>
</body>
</html>